@extends('shopWx.global')

@section('content')
<div class="page page-current" id="user-address-edit">
    <header class="bar bar-nav">
        <h1 class="title">編集</h1>
    </header>
    <div class="content add-address">
        <div class="content-block-title">アドレレス</div>
        <div class="list-block">
            <ul>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">氏名</div>
                            <div class="item-input">
                                <input type="text" name="name" value="{{ $address->name }}" placeholder="Your name">
                            </div>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-email"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">電話</div>
                            <div class="item-input">
                                <input type="text" name="phone" value="{{ $address->phone }}" placeholder="Phone">
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
        <div class="content-block-title">住所</div>
        <div class="list-block">
            <ul>
                {{--<li>--}}
                    {{--<div class="item-content">--}}
                        {{--<div class="item-media"><i class="icon icon-form-gender"></i></div>--}}
                        {{--<div class="item-inner">--}}
                            {{--<div class="item-title label">学校</div>--}}
                            {{--<div class="item-input">--}}
                                {{--<select name="school">--}}
                                    {{--<option value="0"></option>--}}
                                    {{--@foreach($store as $v)--}}
                                        {{--<option value="{{ $v->id }}" @if($address->storeID == $v->id) selected @endif>{{ $v->name }}</option>--}}
                                    {{--@endforeach--}}
                                {{--</select>--}}
                            {{--</div>--}}
                        {{--</div>--}}
                    {{--</div>--}}
                {{--</li>--}}
                <li>
                    <div class="item-content">
                        <div class="item-media"><i class="icon icon-form-name"></i></div>
                        <div class="item-inner">
                            <div class="item-title label">住所</div>
                            <div class="item-input">
                                <input type="text" name="address" value="{{ $address->address }}" placeholder="Address">
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

    <div class="add-address-footer">
        <div class="row no-gutter">
            <div class="col-50">
                <a class="button button-danger back">取消</a>
            </div>
            <div class="col-50">
                <button class="button button-success" onclick="$.updateAddress('{{ action('Shop\UserController@postAddressEdit', ['id' => $address->id]) }}')">保存</button>
            </div>
        </div>
    </div>
</div>
@endsection